//
//  CJExten+Device.swift
//  CJCore
//
//  Created by 陈警卫 on 2024-06-13.
//

import UIKit
import Foundation
import CoreTelephony

public extension UIDevice {
    
    /// System Version
    @objc static var cj_systemVersion: String {
        return CJDevice.systemVersion
    }
    
    /// System Name
    @objc static var cj_systemName: String {
        return CJDevice.systemName
    }
    
    /// Device name
    @objc static var cj_devName: String {
        return CJDevice.devName
    }
    
    /// Device model
    @objc static var cj_devModel: String {
        return CJDevice.devModel
    }
    
    /// Device localizedModel
    @objc static var cj_localizedModel: String {
        return CJDevice.localizedModel
    }
}

public extension UIDevice {
    
    /// 设备硬盘空间
    static var cj_diskSpace: Int64 {
        return CJDevice.diskSpace
    }
    
    /// 设备硬盘剩余空间
    static var cj_diskFreeSpace: Int64 {
        return CJDevice.diskFreeSpace
    }
    
    /// 设备硬盘已使用空间
    static var cj_diskUsedSpace: Int64 {
        return CJDevice.diskUsedSpace
    }
    
}

public extension UIDevice {
    
    static var cj_cacheSize: Int {
        return CJDevice.cacheSize
    }
    
    static var cj_cacheSize_MB: String {
        return CJDevice.cacheSize_MB
    }
}

public extension UIDevice {
    
    /// 设备model name
    static var cj_phoneModel: String {
        return CJDevice.phoneModel
    }
    
    /// 设备identifier对应name
    /// https://www.theiphonewiki.com/wiki/Models
    static var cj_phoneGeneration: Dictionary<String, String> {
        return CJDevice.phoneGeneration
        
    }
}

